package cn.edu.tju.mining.vo.table;

import cn.edu.tju.mining.Factory;

public class Field {
	private String fieldName;
	private String filedNameInTable;
	private String fieldCaption;
	private FieldTypeEnum fieldTypeEnum;
	
	private String fieldFormat="0";
	private String idToNameTable; 
	public Field(){
		
	}
	
	public Field(String fieldName, String filedNameInTable,FieldTypeEnum fieldTypeEnum) {
		super();
		this.fieldName = fieldName;
		this.filedNameInTable=filedNameInTable;
		this.fieldTypeEnum = fieldTypeEnum;
	}
	
	public String getFieldName() {
		return fieldName;
	}
	public void setFieldName(String fieldName) {
		        
		this.fieldName = fieldName;
	}
	public FieldTypeEnum getFieldTypeEnum() {
		return fieldTypeEnum;
	}
	public void setFieldTypeEnum(FieldTypeEnum fieldTypeEnum) {
		this.fieldTypeEnum = fieldTypeEnum;
		
	}

	public String getFieldCaption() {
		return fieldCaption;
	}

	public void setFieldCaption(String fieldCaption) {
		this.fieldCaption = fieldCaption;
	}

	public String getFieldFormat() {
		return fieldFormat;
	}

	public void setFieldFormat(String fieldFormat) {
		this.fieldFormat = fieldFormat;
	}

	
	public String getFieldType() {
		return fieldTypeEnum.toString();
	}
	public void setFieldType(String fieldType) {
		this.fieldTypeEnum = FieldTypeEnum.valueOf(fieldType);
	}
	public String getIdToNameTable() {
		return idToNameTable;
	}
	public void setIdToNameTable(String idToNameTable) {
		this.idToNameTable = idToNameTable;
	}
	public boolean needTransIdToName(){
		return !Factory.utilStr.isEmpty(this.idToNameTable);
	}
	public String getFiledNameInTable() {
		return filedNameInTable;
	}
	public void setFiledNameInTable(String filedNameInTable) {
		this.filedNameInTable = filedNameInTable;
	}

}
